package com.jk.web.controller;

import com.jk.common.model.ChinaAddressBean;
import com.jk.common.model.FlowerBean;
import com.jk.common.model.OrderBean;
import com.jk.web.messager.LogSender;
import com.jk.web.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("web")
public class WebController {

    @Autowired
    private OrderService orderService;



    /**
     * 省级获取
     * @return
     */
    @RequestMapping("getProviceBind")
    @ResponseBody
    public List<ChinaAddressBean> getProviceBind(Integer pid){
        List<ChinaAddressBean> plist=  orderService.getProviceBind(pid);
        return  plist;
    }

    /**
     *
     * @param flowerId
     * @return
     */
    @RequestMapping("queryFlowerPrice")
    @ResponseBody
    public FlowerBean queryFlowerPrice(Integer flowerId){

        FlowerBean flowerBean = orderService.queryFlowerPrice(flowerId);

        return  flowerBean;
    }







}